<?php /* Smarty version Smarty-3.1.8, created on 2019-07-16 20:15:24
         compiled from "/Users/aron/GitRepos/PHPBroShop/broshop/admin/views/default/product/index.html" */ ?>
<?php /*%%SmartyHeaderCode:5772976455d2dbfdcb7b703-78717591%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '9c3be7a8e889aa7909615bea88c3eab2c674388b' => 
    array (
      0 => '/Users/aron/GitRepos/PHPBroShop/broshop/admin/views/default/product/index.html',
      1 => 1450315328,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '5772976455d2dbfdcb7b703-78717591',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'title' => 0,
    'url' => 0,
    'args' => 0,
    'where' => 0,
    'select' => 0,
    'filter_arr' => 0,
    'k' => 0,
    'v' => 0,
    'orderby_arr' => 0,
    'data' => 0,
    'cats' => 0,
    'fpage' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5d2dbfdcd43185_27440271',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5d2dbfdcd43185_27440271')) {function content_5d2dbfdcd43185_27440271($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("public/header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>


<div class="right">
	<div class="now">
		<div class="now_l"></div>
		<div class="now_m">
			<span class="fl"><?php echo $_smarty_tpl->tpl_vars['title']->value;?>
</span>
			<span class="fr fabu"><a href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=add">发布商品</a></span>
		</div>
		<div class="now_r"></div>
		<div class="clear"></div>
	</div>
	<div class="search">
		<div class="fl qiehuan">
			<a href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=index&<?php echo $_smarty_tpl->tpl_vars['args']->value;?>
&state=1" <?php if (!isset($_smarty_tpl->tpl_vars['where']->value['state'])||$_smarty_tpl->tpl_vars['where']->value['state']==1){?> class="sel" <?php }?>>出售中商品</a>
			| <a href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=index&<?php echo $_smarty_tpl->tpl_vars['args']->value;?>
&state=2" <?php if ($_smarty_tpl->tpl_vars['where']->value['state']==2){?> class="sel" <?php }?>>下架的商品</a>
		</div>
		<div class="fr searbox" id="">
			<form method="get">
				<input type="hidden" name="m" value="product" />
				<input type="hidden" name="state" value="1" />

				商品名称：<input type="text" name="name" value="<?php echo $_smarty_tpl->tpl_vars['where']->value['name'];?>
" class="inputtext" />
				<?php echo $_smarty_tpl->tpl_vars['select']->value;?>


				<select name="filter" class="inputselect">
					<option value="">全部商品</option>
					<?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['filter_arr']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
						<option  value="<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['k']->value==$_smarty_tpl->tpl_vars['where']->value['filter']){?> selected="selected" <?php }?>><?php echo $_smarty_tpl->tpl_vars['v']->value;?>
</option>
					<?php } ?>
				</select>

				<select name="orderby" class="inputselect">
					<option value="">默认排序</option>
					<?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['orderby_arr']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
						<option value="<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
"  <?php if ($_smarty_tpl->tpl_vars['k']->value==$_smarty_tpl->tpl_vars['where']->value['orderby']){?> selected="selected" <?php }?>><?php echo $_smarty_tpl->tpl_vars['v']->value;?>
</option>
					<?php } ?>				
				</select>

				<input type="submit" value="搜索" class="input2" />
			</form>
		</div>
		<div class="clear"></div>
	</div>
	<form method="post" id="form">
	<table border="0" cellspacing="0" cellpadding="0" class="list">
	<tr>
		<td class="bgtt" width="10"><input type="checkbox" name="checkall" onclick="bro_checkall(this, 'id')" /></td>
		<td class="bgtt" width="50">ID号</td>
		<td class="bgtt" width="">商品名称</td>
		<td class="bgtt" width="80">商品分类</td>
		<td class="bgtt" width="80">单价(元)</td>
		<td class="bgtt" width="80">售出/库存</td>
		<td class="bgtt" width="50">浏览</td>
		<td class="bgtt" width="88">操作</td>
	</tr>
	<?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
?>
	<tr>
		<td><input type="checkbox" name="id[]" value="<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
" /></td>
		<td><?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
</td>
		<td class="aleft">
			<span class="fl mar5" style="border:1px solid #ddd"><img src="<?php echo thumb($_smarty_tpl->tpl_vars['v']->value['logo'],50,50);?>
" width="45" height="45"></span>
			<a class="cblue" href="index.php?m=product&id=<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
" target="_blank"><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
</a><?php if ($_smarty_tpl->tpl_vars['v']->value['istuijian']){?><span class="cred">[荐]</span><?php }?> <?php if ($_smarty_tpl->tpl_vars['v']->value['istj']){?><span class="cgreen">[特]</span><?php }?>		</td>
		<td class="font13"><?php echo $_smarty_tpl->tpl_vars['cats']->value[$_smarty_tpl->tpl_vars['v']->value['cid']];?>
</td>
		<td><span class="num font16 cred strong"><?php echo $_smarty_tpl->tpl_vars['v']->value['money'];?>
</span></td>
		<td><span class="font14 corg num strong"><?php echo $_smarty_tpl->tpl_vars['v']->value['sellnum'];?>
</span>/<?php echo $_smarty_tpl->tpl_vars['v']->value['num'];?>
</td>
		<td><?php echo $_smarty_tpl->tpl_vars['v']->value['clicknum'];?>
</td>
		<td>
			<a href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=mod&id=<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
" class="admin_edit mar3">修改</a>
			<a href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=del&id=<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
" class="admin_del" onclick="confirm('你确定要删除 <?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
 吗？')">删除</a>
		</td>
	</tr>
	<?php } ?>

		<tr>
		<td class="bgtt"><input type="checkbox" name="checkall" onclick="bro_checkall(this, 'id')" /></td>
		<td class="bgtt" colspan="8">
			<span class="fl">
				<button href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=del" onclick="return bro_cfall(this, 'id', 'form', '批量删除')">批量删除</button>
				<button href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=state&state=1" onclick="return bro_cfall(this, 'id', 'form', '批量上架')">批量上架</button>
				<button href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=state&state=2" onclick="return bro_cfall(this, 'id', 'form', '批量下架')">批量下架</button>
				<button href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=tuijian&tuijian=1" onclick="return bro_cfall(this, 'id', 'form', '批量推荐')">批量推荐</button>
				<button href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=tuijian&tuijian=0" onclick="return bro_cfall(this, 'id', 'form', '取消推荐')">取消推荐</button>
			</span>
		

			<?php echo $_smarty_tpl->tpl_vars['fpage']->value;?>

		</td>
	</tr>
	</table>
	</form>
</div>
<script type="text/javascript"> 
$(function(){

	$("select").change(function(){
		window.location = '<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&a=index&<?php echo $_smarty_tpl->tpl_vars['args']->value;?>
&'+$(this).attr('name')+"="+$(this).find("option:selected").val();
	})
})
</script>

<?php echo $_smarty_tpl->getSubTemplate ("public/footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>



<?php }} ?>